﻿<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="EmpLeaveList.aspx.cs"
    Inherits="UI.ModEmployee.EmpLeaveList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>人员离职列表</title>
    <link rel="stylesheet" type="text/css" href="../Styles/BaseStyle.css" />
    <script type="text/javascript" src="../JS/jsFunction.js"></script>
    <script src="../JS/calendar.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="pagetop" class="pagetop">
        <div class="pagetopleft">
            人员离职表</div>
        <div class="pagetopright">
            工号<asp:TextBox ID="txtSerWord" runat="server" CssClass="InputCss" Width="60px"></asp:TextBox>
            日期<asp:TextBox ID="txtBtime" runat="server" CssClass="InputCss" Width="75px" MaxLength="10"
                onclick="setday(this,false)" onkeypress="return validateKey(this,false, getkeyCode(event));"
                Style="ime-mode: Disabled;"></asp:TextBox>
            至<asp:TextBox ID="txtEtime" runat="server" CssClass="InputCss" Width="75px" MaxLength="10"
                onclick="setday(this,false)" onkeypress="return validateKey(this,false, getkeyCode(event));"
                Style="ime-mode: Disabled;"></asp:TextBox>
            <asp:DropDownList ID="ddlLeaveType" CssClass="InputCss" Width="100px" onkeydown="if(event.keyCode==13)event.keyCode=9"
                runat="server">
                <asp:ListItem Selected="True" Value="0">离职类型</asp:ListItem>
                <asp:ListItem>自动离职</asp:ListItem>
                <asp:ListItem>擅自离职</asp:ListItem>
                <asp:ListItem>辞退</asp:ListItem>
                <asp:ListItem>开除</asp:ListItem>
                <asp:ListItem>请长假</asp:ListItem>
            </asp:DropDownList>
            状态
            <asp:DropDownList ID="ddlState" CssClass="InputCss" onkeydown="if(event.keyCode==13)event.keyCode=9"
                runat="server">
                <asp:ListItem Selected="True" Value="Y">离职</asp:ListItem>
                <asp:ListItem Value="N">复职</asp:ListItem>
                <asp:ListItem Value="ALL">所有</asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="ddlDeptID" runat="server" CssClass="InputCss">
            </asp:DropDownList>
            <asp:Button ID="btnEmSearch" runat="server" Text="查询" OnClick="btnEmSearch_Click"
                CssClass="ButtonCss" />
            <asp:Button ID="btnAdd" runat="server" Text="增加" CssClass="ButtonCss" />
            <asp:Button ID="btnExcel" runat="server" Text="导出" CssClass="ButtonCss" OnClick="btnExcel_Click" />
        </div>
    </div>
    <div id="content">
        <asp:GridView ID="gvList" runat="server" DataKeyNames="LeaveID" Width="100%" AutoGenerateColumns="False"
            BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
            CellPadding="3" GridLines="Horizontal" OnRowDataBound="gvList_RowDataBound" CssClass="td">
            <Columns>
                <asp:BoundField DataField="LeaveID" HeaderText="LeaveID" SortExpression="LeaveID">
                </asp:BoundField>
                <asp:BoundField DataField="DeptName" HeaderText="部门名称" SortExpression="DeptName">
                    <ItemStyle Width="90px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="工号" SortExpression="EmpCode" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <a href="javascript:ShowLink('EmpLeaveAdd.aspx?LeaveID=<%# Eval("LeaveID")%>',800,550)">
                            <%# Eval("EmpCode")%></a>
                    </ItemTemplate>
                    <ItemStyle Width="70px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="姓名" SortExpression="EmpName" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <a href="javascript:ShowLink('EmpLeaveAdd.aspx?LeaveID=<%# Eval("LeaveID")%>',800,550)">
                            <%# Eval("EmpName")%></a>
                    </ItemTemplate>
                    <ItemStyle Width="70px" />
                </asp:TemplateField>
                <asp:BoundField DataField="EmpSex" HeaderText="性别" SortExpression="EmpSex">
                    <ItemStyle Width="60px" />
                </asp:BoundField>
                <asp:BoundField DataField="DutyName" HeaderText="职务" SortExpression="DutyName">
                    <ItemStyle Width="90px" />
                </asp:BoundField>
                <asp:BoundField DataField="JoinTime" HeaderText="入职时间" DataFormatString="{0:d}" SortExpression="JoinTime">
                    <ItemStyle Width="80px" />
                </asp:BoundField>
                <asp:BoundField DataField="LeaveTime" HeaderText="离职时间" DataFormatString="{0:d}"
                    SortExpression="LeaveTime">
                    <ItemStyle Width="80px" />
                </asp:BoundField>
                <asp:BoundField DataField="LeaveType" HeaderText="离职类型" SortExpression="LeaveType">
                    <ItemStyle Width="80px" />
                </asp:BoundField>
                <asp:BoundField DataField="DayNum" HeaderText="移交天数" SortExpression="DayNum">
                    <ItemStyle Width="80px" />
                </asp:BoundField>
                <asp:BoundField DataField="IsProcedure" HeaderText="是否移交" SortExpression="IsProcedure">
                    <ItemStyle Width="80px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="计薪" SortExpression="IsSalary" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <%# Eval("IsSalary").ToString()=="N"?"否":"计薪"%>
                    </ItemTemplate>
                    <ItemStyle Width="38px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="状态" SortExpression="Statu" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <%# (Eval("Statu").ToString() == "N") ? "失效" : "正常"%>
                    </ItemTemplate>
                    <ItemStyle Width="38px" />
                </asp:TemplateField>
                <asp:BoundField DataField="Memo" HeaderText="备注">
                    <ItemStyle Width="100px" />
                </asp:BoundField>
            </Columns>
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <AlternatingRowStyle BackColor="#F7F7F7" />
        </asp:GridView>
        <div id="divAmount" class="amountLine">
            <asp:Label ID="lbAmount" runat="server"></asp:Label>
        </div>
    </div>
    </form>
</body>
</html>
